package com.wzdigit.wms.basic.client.request.basic;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 创建仓库属性输入
 * @author yangdongjie
 * @CreateWarehouseAttrRequest.java
 * @2020年12月31日下午5:39:24
 */
@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(value = {"hibernateLazyInitializer", "handler", "fieldHandler"}, ignoreUnknown = true)
public class CreateWarehouseAttrRequest implements Serializable {


	private static final long serialVersionUID = -4926664353887081031L;

	/**
	 * 仓库ID
	 */
	@ApiModelProperty(value = "仓库ID", required = true)
    @NotNull(message = "仓库ID不能为空！")
	private Integer whsId;

	/**
	 * 属性
	 */
	@ApiModelProperty(value = "属性", required = true)
    @NotBlank(message = "属性不能为空！")
	private String attr;

	/**
	 * 值
	 */
	@ApiModelProperty(value = "值", required = true)
    @NotBlank(message = "值不能为空！")
	private String value;

	/**
	 * 备注
	 */
	@ApiModelProperty(value = "备注", required = false)
	private String comments;

	/**
	 * 是否有效
	 */
	@ApiModelProperty(value = "是否有效", required = true)
    @NotNull(message = "是否有效不能为空！")
	@Range(min = 0, max = 1, message = "是否有效错误")
	private Integer isEnabled;

}